package com.geeguo.ebuilder.operation.business.system.user.model;

import com.geeguo.ebuilder.core.common.model.converter.DateLongMapper;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper(uses = DateLongMapper.class)
public interface UserConverter {

    UserConverter INSTANCE = Mappers.getMapper(UserConverter.class);

    UserCO convert2CO(UserVO vo);
    UserCO convert2CO(UserEntity entity);

    UserVO convert2VO(UserCO co);
    UserVO convert2VO(UserEntity entity);
    UserVO convert2VO(UserCreateDTO dto);
    UserVO convert2VO(UserUpdateDTO dto);

    UserEntity convert2Entity(UserVO vo);
    UserEntity convert2Entity(UserCreateDTO dto);
    UserEntity convert2Entity(UserUpdateDTO dto);

    UserSimpleVO convert2SimpleVO(UserEntity entity);
}